package com.mysiteforme.wx.mp.bs.impl;

import com.alibaba.dubbo.config.annotation.Reference;
import com.mysiteforme.bean.ResponseBean;
import com.mysiteforme.wx.mp.bs.CallBS;
import com.mysiteforme.user.bs.DictService;
import com.mysiteforme.user.bs.UserBS;
import com.mysiteforme.user.dto.UserDTO;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

@Service
public class CallBSImpl implements CallBS {
    @Reference
    private UserBS userBS;

    @Reference
    private DictService dictService;

    @Override
    public UserDTO getUser() {
        return userBS.get();
    }

    @Override
    public ResponseBean getBean() {
        return userBS.getBean();
    }

    @Override
    public ResponseBean getDict() {
        Map data = new HashMap();
        data.put("list",dictService.getDictByType("sys_rescource_source"));
        ResponseBean bean =  new ResponseBean(200, "成功",null, data);
        return bean;
    }
}
